require(['./config'],()=>{
    require(['template','header','footer'],(template)=>{
        class Index {
            constructor(){
                this.getCategory()
            }
            getCategory(){
                $.get('/libs/json/shouye.json',resp=>{
                    // console.log(resp)
                    this.readerCategory(resp)
                })
            }
            readerCategory(list){
                console.log(template)
                const html= template('categoryTemplate',{list:list})
                console.log(html)
                $('#new').html(html)
            }
        }
        new Index()
    })
})